package com.aaa.yilaidaozhi;

public interface ISendMsg {
    String sendMsg();
}
class Email1 implements ISendMsg{

    @Override
    public String sendMsg() {
        return "邮箱：hello,world";
    }
}

class Weixin1 implements ISendMsg{

    @Override
    public String sendMsg() {
        return "微信：hello,微信";
    }
}

class FeiQiu implements ISendMsg{

    @Override
    public String sendMsg() {
        return "飞秋：hello,飞秋";
    }
}

class Person1{
    public void receive(ISendMsg email){
        System.out.println("收到："+email.sendMsg());
    }
}


class Test1{
    public static void main(String[] args) {
        Person1 person = new Person1();
        Weixin1 feiQiu = new Weixin1();
         person.receive(feiQiu);
    }

}

